OnExpireDurationUpdate

SoftwareShield ClientProtector COM Component > ClientProtector (SSCProtector) Reference > OnExpireDurationUpdate

## OnExpireDurationUpdate

OnExpireDurationUpdate is an event function of the ClientProtector dispatch interface. This event will fire every time the expire duration background monitoring thread performs its check. Your application may respond to this event if you subscribe to it. This event will allow you to synchronously take an action or record data about the progress of an expire duration in the currently loaded license.

###### Syntax

HRESULT OnExpireDurationUpdate (

long * ExpireDurationSecondsTotal,

long * ExpireDurationSecondsUsed,

VARIANT_BOOL * IsExpiredByDuration,

VARIANT_BOOL * AutoKill

) ;

###### Parameters

ExpireDurationSecondstotal

[IN] This is (a pointer to) a numeric value that will contain the total expire duration in seconds for the currently loaded license.

ExpireDurationSecondsUsed

[IN] This is (a pointer to) a numeric value that will contain the number of seconds used (consumed) from the expire duration by the current trial.

IsExpiredbyDuration

[IN] This is (a pointer to) a boolean value which will contain true if the license has expired because of the expire duration.

AutoKill

[IN] This is (a pointer to) a boolean value which indicates the state of the "AutoKill" flag in the currently loaded license.

###### Remarks

OnExpireDurationUpdate is an event function of the ClientProtector dispatch interface. This event will fire every time the expire duration background monitoring thread performs its check. Your application may respond to this event if you subscribe to it. This event will allow you to synchronously take an action or record data about the progress of an expire duration in the currently loaded license.

When ExpireDurationSecondsUsed is equal to or greater than ExpireDurationSecondstotal, the license is expired by duration and IsExpiredbyDuration will contain a true value.

Note that AutoKill in the context of a non-IronWrapped application is simply a flag. If you do not have your application IronWrapped, it will be up to your application responding to this event to shut down the application.

THREAD SAFETY: Your applications event sink that responds to this event is not thread safe. Generally it is recommended that you record the data sent into this function and take any actions on it later in the context of the main thread of your application. This is especially an issue if you are using Borland products; if so, definitely do not use any UI functionality from the Borland VCL inside the scope of this call.

###### Return Value

As with all COM function calls they return an HRESULT. HRESULT is a data type that is a 32-bit error or warning code. Check your compilers documentation for information on interpreting the HRESULT value.

###### Function Information

Exposed By Interface: | "ISSCProtector"
Exposed In COM Server Binaries: | "SSCProt.dll" and "SSCProtD.dll"